package org.example;

import java.math.BigDecimal;

/**
 * @author huyong
 * @date 2024 年 01 月 23 日 16:59: 27
 */public class Main {
    public static void main(String[] args) {
        BigDecimal bigDecimal=new BigDecimal("-100.27");
        System.out.println(bigDecimal);
        Double value=new Double("-100.27");
        boolean b = doubleIsNull(value);
        System.out.println(b);
        boolean matches = "202".matches("\\d{3}[1-9]|\\d{2}[1-9]\\d|\\d[1-9]\\d{2}|[1-9]\\d{3}");
        System.out.println(matches);
        matches="02".matches("^([1-9]|1[0-2])$");
        System.out.println(matches);
    }

    private static boolean doubleIsNull(Double value) {
        return value == null || value.equals(Double.NaN);
    }

}